package com.xqls.service;

import java.util.List;

import org.quartz.SchedulerException;

import com.xqls.dal.model.TScheduleJob;

public interface QuatzOperationService {
	/**
	 * 获取所有计划中的任务列表
	 * @return
	 */
	public List<TScheduleJob> getAllJob() throws SchedulerException;
	/**
	 * 所有正在运行的job
	 * @return
	 */
	public List<TScheduleJob> getRunningJob() throws SchedulerException;
	/**
	 * 暂停一个job
	 * @param scheduleJob
	 * @return
	 */
	public int upatePauseJob(TScheduleJob scheduleJob) throws SchedulerException;
	/**
	 * 恢复一个job
	 * @param scheduleJob
	 */
	public void resumeJob(TScheduleJob scheduleJob) throws SchedulerException;
	/**
	 * 删除一个job
	 * @param scheduleJob
	 */
	public void deleteJob(TScheduleJob scheduleJob) throws SchedulerException;
	/**
	 * 立即执行job
	 * @param scheduleJob
	 */
	public void runAJobNow(TScheduleJob scheduleJob) throws SchedulerException;
	/**
	 * 更新job时间表达式
	 * @param scheduleJob
	 */
	public void updateJobCron(TScheduleJob scheduleJob) throws SchedulerException;
	
	
}
